package me.zhengjie.weixin;

import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;


/**
 * @description 微信配置
 * @author xiahongbo
 * @date 2022-07-13
 **/
@Configuration
@Getter
public class WeiXinConfig {

    //  微信公众号APPID
    public static String appId;

    //  微信公众号secretKey
    public static String secretKey;

    //  微信公众号内网访问地址
    public static String apiUrl;


    @Value("${weixin.appId}")
    public void setEndPoint(String appId) {
        this.appId = appId;
    }

    @Value("${weixin.secretKey}")
    public void setAccessKey(String secretKey) {
        this.secretKey = secretKey;
    }

    @Value("${weixin.apiUrl}")
    public void setApiUrl(String apiUrl){ this.apiUrl = apiUrl; }


    @Override
    public String toString() {
        return "WeiXinConfig [appId=" + appId + ", secretKey=" + secretKey + "]";
    }
}
